#!/usr/bin/perl -w
# vim:tw=100 sw=2 expandtab ft=perl
#
# Example:
#
# crontab => {
#   test_file => [
#     '* * * * * root ps fax >/dev/null',
#   ],
# },

my %crontab = flatten_hash(c("$hostname/crontab"));
map { text_install("/etc/cron.d/$_", join("\n", @{$crontab{$_}}). "\n") } keys %crontab;

my %crontab_include = flatten_hash(c("$hostname/crontab_include"));
map { file_append("/etc/crontab", $_, $crontab_include{$_}) } keys %crontab_include;

